package com.xmz.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderVo {

    private Integer id;
    private String name;
    @Pattern(regexp = "^[1-9]\\d*$",message = "数量只能为正整数")
    private Integer count;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;
    private Integer deleted;
    @Pattern(regexp = "^\\d+(\\.\\d+)?$\n",message = "价格只能为正数")
    private Float price;

    @Pattern(regexp = "[0-1]",message = "只能为0或1")
    private Integer state;
    private Integer userId;
}
